<?php
  //name: connect
  //utility: use to create un PDO object which login with the database
  //input: nothing
  //output: $db, it's the login parameters
  
  function connect()
  {
      try {
          $pdo_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION;
		  //$db = new PDO('mysql:host=localhost;dbname=incognit_androidglb', 'root', '', $pdo_options);
          $db = new PDO('mysql:host=localhost;dbname=incognit_androidglb', 'incognit_glbmap4', 'korsakoff!@', $pdo_options); 
          echo "Connection réussi" . '</br>';
      }
      catch (Exception $e) {
          die('Erreur : ' . $e->getMessage());
      }
      return $db;
  }
?>